<script setup>
import HelloWorld from "./components/HelloWorld.vue";
import ScaleBox from "vue3-scale-box";
import { useScaleStore } from "@/stores/scaleStore";

const scaleStore = useScaleStore();

const handleScaleChange = (scale) => {
  scaleStore.setScale(scale); // 存储到全局状态
};
</script>

<template>
  <ScaleBox
    :width="1920"
    :height="1080"
    bgc="transparent"
    @scaleChange="handleScaleChange"
    :autoScale="true"
  >
    <HelloWorld />
  </ScaleBox>
</template>

<style scoped></style>
